package com.example.springboot.dao;

import com.example.springboot.controller.DTO.GoodsQueryDTO;
import com.example.springboot.entity.Cart;
import com.example.springboot.entity.Goods;
import com.example.springboot.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface GoodsDao {

    List<Goods> findAll();


    List<Goods> findByOptions(GoodsQueryDTO goodsQueryDTO);

    int insert(Goods goods);

    int updata(Goods goods);

    int deleteById(Integer id);

    Goods getById(Integer id);


    int updataNums(Integer nums, Integer id);


    int updataOrderItem(Goods goods, Cart cart);

    int updataCancleNums(Integer goodsId, Integer nums);

    List<String> findName();
}
